********************************************************************************
* Rainer Kotschy
* Health Improvements Impact Income Inequality (JEOA-100385)
* Replication Material


cd
clear all
set more off
graph set window fontface "Times New Roman"


* Install necessary software packages (see README file)
*ssc install ivreg2
*ssc install ranktest
*ssc install ftools
*ssc install estout
*ssc install avar
*ssc install weakivtest
*ssc install coefplot
*ssc install plausexog
*search rivtest


********************************************************************************
* Figure 1: Partial Correlations for Wage Inequality Before and After Treatment


use "jeoa100385_data.dta", clear


* Figure 1(a): Reduced form 1950-1960

preserve
#delimit;

keep if year == 1950 | year == 1960;
xtset id year, delta(10);

qui reg D.gini_incwagew D.mort_cvd_1950 D.mort_other_1950 D.shcoll_1950 D.lnincwagew1564_1950 [aw=wpop_1960] if year == 1960, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_1950];
	loc se : di %04.2f _se[D.mort_cvd_1950];
	loc t : di %04.2f _b[D.mort_cvd_1950] / _se[D.mort_cvd_1950];

avplot D.(mort_cvd_1950),
	ytitle("E( Change in wage inequality 1950-1960 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


* Figure 1(b): Reduced form 1960-2000

preserve
#delimit;

keep if year == 1960 | year == 2000;
xtset id year, delta(40);

qui reg D.gini_incwagew D.mort_cvd_2000 D.mort_other_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960] if year == 2000, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_2000];
	loc se : di %04.2f _se[D.mort_cvd_2000];
	loc t : di %04.2f _b[D.mort_cvd_2000] / _se[D.mort_cvd_2000];

avplot D.(mort_cvd_2000),
	ytitle("E( Change in wage inequality 1960-2000 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


* Figure 1(c): First stage 1950-1960

preserve
#delimit;

keep if year == 1950 | year == 1960;
xtset id year, delta(10);

qui reg D.ln_life_exp_30 D.mort_cvd_1950 D.mort_other_1950 D.shcoll_1950 D.lnincwagew1564_1950 [aw=wpop_1960] if year == 1960, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_1950];
	loc se : di %04.2f _se[D.mort_cvd_1950];
	loc t : di %04.2f _b[D.mort_cvd_1950] / _se[D.mort_cvd_1950];

avplot D.(mort_cvd_1950),
	ytitle("E( Change in log life expectancy at 30 1950-1960 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


* Figure 1(d): First stage 1960-2000

preserve
#delimit;

keep if year == 1960 | year == 2000;
xtset id year, delta(40);

qui reg D.ln_life_exp_30 D.mort_cvd_2000 D.mort_other_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960] if year == 2000, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_2000];
	loc se : di %04.2f _se[D.mort_cvd_2000];
	loc t : di %04.2f _b[D.mort_cvd_2000] / _se[D.mort_cvd_2000];

avplot D.(mort_cvd_2000),
	ytitle("E( Change in log life expectancy at 30 1960-2000 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


********************************************************************************
* Table 1: Effect of Health on Income Inequality


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)


* Table 1(a): Second stage

* Column 1: Wage gini coefficient, no controls
ivreg2 D.gini_incwagew ( D.ln_life_exp_30 = D.mort_cvd_2000 ) [aw=wpop_1960], cl(id)
	est sto table_1a1
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_1a1
* Column 2: Wage gini coefficient, controls for income and education
ivreg2 D.gini_incwagew ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_1a2
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_1a2
* Column 3: Wage gini coefficient, full controls
ivreg2 D.gini_incwagew ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_1a3
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_1a3
* Column 4: Total income gini coefficient, no controls
ivreg2 D.gini_inctotw ( D.ln_life_exp_30 = D.mort_cvd_2000 ) [aw=wpop_1960], cl(id)
	est sto table_1a4
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_1a4
* Column 5: Total income gini coefficient, controls for income and education
ivreg2 D.gini_inctotw ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_1a5
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_1a5
* Column 6: Total income gini coefficient, full controls
ivreg2 D.gini_inctotw ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_1a6
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_1a6
* Display results
esttab table_1a*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.ln_life_exp_30) scalars(widstat artest) sfmt(%5.1f %5.2f) obslast nonotes compress


* Table 1(b): Reduced form

* Column 1: Wage gini coefficient, no controls
reg D.gini_incwagew D.mort_cvd_2000 [aw=wpop_1960], cl(id)	
	est sto table_1b1
* Column 2: Wage gini coefficient, controls for income and education
reg D.gini_incwagew D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_1b2
* Column 3: Wage gini coefficient, full controls
reg D.gini_incwagew D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_1b3
* Column 4: Total income gini coefficient, no controls
reg D.gini_inctotw D.mort_cvd_2000 [aw=wpop_1960], cl(id)
	est sto table_1b4
* Column 5: Total income gini coefficient, controls for income and education
reg D.gini_inctotw D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_1b5
* Column 6: Total income gini coefficient, full controls
reg D.gini_inctotw D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_1b6
* Display results
esttab table_1b*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.mort_cvd_2000) obslast nonotes compress


* Table 1(c): First stage

* Column 1: Life expectancy at 30, no controls
reg D.ln_life_exp_30 D.mort_cvd_2000 [aw=wpop_1960], cl(id)	
	est sto table_1c1
* Column 2: Life expectancy at 30, controls for income and education
reg D.ln_life_exp_30 D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_1c2
* Column 3: Life expectancy at 30, full controls
reg D.ln_life_exp_30 D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_1c3
* Column 4: Life expectancy at 30, no controls
reg D.ln_life_exp_30 D.mort_cvd_2000 [aw=wpop_1960], cl(id)
	est sto table_1c4
* Column 5: Life expectancy at 30, controls for income and education
reg D.ln_life_exp_30 D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_1c5
* Column 6: Life expectancy at 30, full controls
reg D.ln_life_exp_30 D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_1c6
* Display results
esttab table_1c*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.mort_cvd_2000) obslast sfmt(a2) nonotes compress


********************************************************************************
* Figure 2: Estimated Differences in Health and Inequality over Time


use "jeoa100385_data.dta", clear
drop if year == 1940
xtset id year, delta(10)

gl mort_heart "mort_cvd_1950 o.mort_cvd_1960 mort_cvd_1970 mort_cvd_1980 mort_cvd_1990 mort_cvd_2000"
gl mort_other "mort_other_1950 mort_other_1970 mort_other_1980 mort_other_1990 mort_other_2000"
gl shcoll "shcoll_1950 shcoll_1970 shcoll_1980 shcoll_1990 shcoll_2000"
gl lnincwage "lnincwagew1564_1950 lnincwagew1564_1970 lnincwagew1564_1980 lnincwagew1564_1990 lnincwagew1564_2000"
gl lninctot "lninctotw1564_1950 lninctotw1564_1970 lninctotw1564_1980 lninctotw1564_1990 lninctotw1564_2000"
gl td "td1950 td1970 td1980 td1990 td2000"


* Figure 2(a): Reduced form

#delimit ;

qui xtreg gini_incwagew $mort_heart $shcoll $lnincwage $mort_other $td [aw=wpop_1960], fe cl(id);
	est sto fig_2a1;

qui xtreg gini_inctotw $mort_heart $shcoll $lninctot $mort_other $td [aw=wpop_1960], fe cl(id);
	est sto fig_2a2;

coefplot (fig_2a1, msymbol(o)) (fig_2a2, msymbol(s)),
	recast(connected) keep(mort_cvd_*) vert omit
	rename(mort_cvd_1950 = "1950" mort_cvd_1960 = "1960" mort_cvd_1970 = "1970"  mort_cvd_1980 = "1980" mort_cvd_1990 = "1990" mort_cvd_2000 = "2000")
	order("1950" "1960" "1970" "1980" "1990" "2000")
	ytitle("Estimated coefficients", size(medium))
	ysca(titlegap(2))
	ylab(-.2(.2).6 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("Year", size(medium))
	xsca(titlegap(2))
	legend(rows(2) cols(1) ring(0) position(10) label(2 "Wage Gini (Table A2c, Col. 3)") label(4 "Total Income Gini (Table A2c, Col. 6)"))
	graphregion(color(white)) bgcolor(white) 
;

#delimit cr


* Figure 2(b): First stage

#delimit ;

qui xtreg ln_life_exp_30 $mort_heart $shcoll $lnincwage $mort_other $td [aw=wpop_1960], fe cl(id);
	est sto fig_2b1;

qui xtreg ln_life_exp_30 $mort_heart $shcoll $lninctot $mort_other $td [aw=wpop_1960], fe cl(id);
	est sto fig_2b2;

coefplot (fig_2b1, msymbol(o)) (fig_2b2, msymbol(s)),
	recast(connected) keep(mort_cvd_*) vert omit
	rename(mort_cvd_1950 = "1950" mort_cvd_1960 = "1960" mort_cvd_1970 = "1970"  mort_cvd_1980 = "1980" mort_cvd_1990 = "1990" mort_cvd_2000 = "2000")
	order("1950" "1960" "1970" "1980" "1990" "2000")
	ytitle("Estimated coefficients", size(medium))
	ysca(titlegap(2))
	ylab(-.2(.2).6 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("Year", size(medium))
	xsca(titlegap(2))
	legend(rows(2) cols(1) ring(0) position(10) label(2 "Wage Gini (Table A2d, Col. 3)") label(4 "Total Income Gini (Table A2d, Col. 6)"))
	graphregion(color(white)) bgcolor(white)
;

#delimit cr


********************************************************************************
* Table 2: Mechanisms: College Education, Labor Supply, and Occupational Structure


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)


* Column 1: Wage gini coefficient, college graduation
ivreg2 D.gini_incwagew ( D.coll_grad_15_64 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_21
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_21
* Column 2: Wage gini coefficient, hours worked per year
ivreg2 D.gini_incwagew ( D.wlab_sup_15_64 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_22
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_22
* Column 3: Wage gini coefficient, ratio of white-collar to blue-collar workers
ivreg2 D.gini_incwagew ( D.ratio_wc_bc = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_23
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_23
* Column 4: Total income gini coefficient, college graduation
ivreg2 D.gini_inctotw ( D.coll_grad_15_64 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_24
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_24
* Column 5: Total income gini coefficient, hours worked per year
ivreg2 D.gini_inctotw ( D.wlab_sup_15_64 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_25
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_25
* Column 6: Total income gini coefficient, ratio of white-collar to blue-collar workers
ivreg2 D.gini_inctotw ( D.ratio_wc_bc = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_26
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_26
* Display results
esttab table_2*, b(a2 a1 a1) se(a2 a1 a1) star(* .1 ** .05 *** .01) keep(D.coll_grad_15_64 D.wlab_sup_15_64 D.ratio_wc_bc) scalars(widstat artest) sfmt(%5.1f %5.2f) obslast nonotes compress


********************************************************************************
* Figure A1: Partial Correlations for Total Income Inequality Before and After Treatment


use "jeoa100385_data.dta", clear


* Figure A1(a): Reduced form 1950-1960

preserve
#delimit;

keep if year == 1950 | year == 1960;
xtset id year, delta(10);

qui reg D.gini_inctotw D.mort_cvd_1950 D.mort_other_1950 D.shcoll_1950 D.lninctotw1564_1950 [aw=wpop_1960] if year == 1960, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_1950];
	loc se : di %04.2f _se[D.mort_cvd_1950];
	loc t : di %04.2f _b[D.mort_cvd_1950] / _se[D.mort_cvd_1950];

avplot D.(mort_cvd_1950),
	ytitle("E( Change in total income inequality 1950-1960 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


* Figure A1(b): Reduced form 1960-2000

preserve
#delimit;

keep if year == 1960 | year == 2000;
xtset id year, delta(40);

qui reg D.gini_inctotw D.mort_cvd_2000 D.mort_other_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960] if year == 2000, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_2000];
	loc se : di %04.2f _se[D.mort_cvd_2000];
	loc t : di %04.2f _b[D.mort_cvd_2000] / _se[D.mort_cvd_2000];

avplot D.(mort_cvd_2000),
	ytitle("E( Change in total income inequality 1960-2000 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


* Figure A1(c): First stage 1950-1960

preserve
#delimit;

keep if year == 1950 | year == 1960;
xtset id year, delta(10);

qui reg D.ln_life_exp_30 D.mort_cvd_1950 D.mort_other_1950 D.shcoll_1950 D.lninctotw1564_1950 [aw=wpop_1960] if year == 1960, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_1950];
	loc se : di %04.2f _se[D.mort_cvd_1950];
	loc t : di %04.2f _b[D.mort_cvd_1950] / _se[D.mort_cvd_1950];

avplot D.(mort_cvd_1950),
	ytitle("E( Change in log life expectancy at 30 1950-1960 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore
	

* Figure A1(d): First stage 1960-2000

preserve
#delimit;

keep if year == 1960 | year == 2000;
xtset id year, delta(40);

qui reg D.ln_life_exp_30 D.mort_cvd_2000 D.mort_other_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960] if year == 2000, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_2000];
	loc se : di %04.2f _se[D.mort_cvd_2000];
	loc t : di %04.2f _b[D.mort_cvd_2000] / _se[D.mort_cvd_2000];

avplot D.(mort_cvd_2000),
	ytitle("E( Change in log life expectancy at 30 1960-2000 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


********************************************************************************
* Figure A2: Partial Correlations for Wage Inequality 1940–1960


use "jeoa100385_data.dta", clear


* Figure A2(a): Reduced form 1940-1960

preserve
#delimit;

keep if year == 1940 | year == 1960;
xtset id year, delta(20);

qui reg D.gini_incwagew D.mort_cvd_1940 D.mort_other_1940 D.shcoll_1940 D.lnincwagew1564_1940 [aw=wpop_1960] if year == 1960, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_1940];
	loc se : di %04.2f _se[D.mort_cvd_1940];
	loc t : di %04.2f _b[D.mort_cvd_1940] / _se[D.mort_cvd_1940];

avplot D.(mort_cvd_1940),
	ytitle("E( Change in wage inequality 1940-1960 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


* Figure A2(b): First stage 1940-1960

preserve
#delimit;

keep if year == 1940 | year == 1960;
xtset id year, delta(20);

qui reg D.ln_life_exp_30 D.mort_cvd_1940 D.mort_other_1940 D.shcoll_1940 D.lnincwagew1564_1940 [aw=wpop_1960] if year == 1960, cl(id);
	loc b : di %04.2f _b[D.mort_cvd_1940];
	loc se : di %04.2f _se[D.mort_cvd_1940];
	loc t : di %04.2f _b[D.mort_cvd_1940] / _se[D.mort_cvd_1940];

avplot D.(mort_cvd_1940),
	ytitle("E( Change in log life expectancy at 30 1940-1960 | X )", size(medium))
	ysca(titlegap(2))
	ylab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	yline(0, lcolor(ltbluishgray))
	xtitle("E( Predicted decline in cardiovascular disease mortality 1960-2000 | X )", size(medium))
	xlab(-.08(.04).08 0 "0", nogrid angle(0) format(%4.2f))
	xsca(titlegap(2))
	lcolor(cranberry) mlab(state_code) mlabs(small)
	rlopts(lcolor(cranberry))
	text(-.06 .05 `"coef = `b', se = `se', t = `t'"', size(medium)) note("")
	graphregion(color(white)) bgcolor(white)
;

#delimit cr
restore


********************************************************************************
* Table A1: Descriptive Statistics


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)
replace coll_grad_15_64 = coll_grad_15_64 * 100 // display in percent


* Income inequality
su gini_incwagew if year == 1960, f
su gini_incwagew if year == 2000, f
su gini_inctotw if year == 1960, f
su gini_inctotw if year == 2000, f
su theil_incwagew if year == 1960, f
su theil_incwagew if year == 2000, f
su theil_inctotw if year == 1960, f
su theil_inctotw if year == 2000, f

* Adult health and mortality
su life_exp_30 if year == 1960, f
su life_exp_30 if year == 2000, f
su ln_life_exp_30 if year == 1960, f
su ln_life_exp_30 if year == 2000, f
su mortality_heart_1960 if year == 1960, f
su mortality_heart_2000 if year == 2000, f
su mortality_other_1960 if year == 1960, f
su mortality_other_2000 if year == 2000, f

* Income, education, labor supply, and occupational structure
su ln_incwagew_15_64 if year == 1960, f
su ln_inctotw_15_64 if year == 1960, f
su coll_grad_15_64 if year == 1960, f
su coll_grad_15_64 if year == 2000, f
su wlab_sup_15_64 if year == 1960, f
su wlab_sup_15_64 if year == 2000, f
su ratio_wc_bc if year == 1960, f
su ratio_wc_bc if year == 2000, f


********************************************************************************
* Table A2: Panel Results: Effect of Health on Income Inequality


use "jeoa100385_data.dta", clear
drop if year == 1940
xtset id year, delta(10)

gl mort_heart "mort_cvd_1950 mort_cvd_1970 mort_cvd_1980 mort_cvd_1990 mort_cvd_2000"
gl mort_other "mort_other_1950 mort_other_1970 mort_other_1980 mort_other_1990 mort_other_2000"
gl shcoll "shcoll_1950 shcoll_1970 shcoll_1980 shcoll_1990 shcoll_2000"
gl lnincwage "lnincwagew1564_1950 lnincwagew1564_1970 lnincwagew1564_1980 lnincwagew1564_1990 lnincwagew1564_2000"
gl lninctot "lninctotw1564_1950 lninctotw1564_1970 lninctotw1564_1980 lninctotw1564_1990 lninctotw1564_2000"
gl td "td1950 td1970 td1980 td1990 td2000"


* Table A2(a): Second stage (2SLS)

* Column 1: Wage gini coefficient, no controls
ivreg2 gini_incwagew ( ln_life_exp_30 = $mort_heart ) $td i.id [aw=wpop_1960], partial(i.id) cl(id)
	est sto table_a2a1
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2a1
	estadd sca tau10 = `r(c_TSLS_10)': table_a2a1
	estadd sca tau20 = `r(c_TSLS_20)': table_a2a1
	estadd sca tau30 = `r(c_TSLS_30)': table_a2a1
* Column 2: Wage gini coefficient, controls for income and education
ivreg2 gini_incwagew ( ln_life_exp_30 = $mort_heart ) $shcoll $lnincwage $td i.id [aw=wpop_1960], partial(i.id) cl(id)
	est sto table_a2a2
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2a2
	estadd sca tau10 = `r(c_TSLS_10)': table_a2a2
	estadd sca tau20 = `r(c_TSLS_20)': table_a2a2
	estadd sca tau30 = `r(c_TSLS_30)': table_a2a2
* Column 3: Wage gini coefficient, full controls
ivreg2 gini_incwagew ( ln_life_exp_30 = $mort_heart ) $shcoll $lnincwage $mort_other $td i.id [aw=wpop_1960], partial(i.id) cl(id)
	est sto table_a2a3
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2a3
	estadd sca tau10 = `r(c_TSLS_10)': table_a2a3
	estadd sca tau20 = `r(c_TSLS_20)': table_a2a3
	estadd sca tau30 = `r(c_TSLS_30)': table_a2a3
* Column 4: Total income gini coefficient, no controls
ivreg2 gini_inctotw ( ln_life_exp_30 = $mort_heart ) $td i.id [aw=wpop_1960], partial(i.id) cl(id)
	est sto table_a2a4
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2a4
	estadd sca tau10 = `r(c_TSLS_10)': table_a2a4
	estadd sca tau20 = `r(c_TSLS_20)': table_a2a4
	estadd sca tau30 = `r(c_TSLS_30)': table_a2a4
* Column 5: Total income gini coefficient, controls for income and education
ivreg2 gini_inctotw ( ln_life_exp_30 = $mort_heart ) $shcoll $lninctot $td i.id [aw=wpop_1960], partial(i.id) cl(id)
	est sto table_a2a5
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2a5
	estadd sca tau10 = `r(c_TSLS_10)': table_a2a5
	estadd sca tau20 = `r(c_TSLS_20)': table_a2a5
	estadd sca tau30 = `r(c_TSLS_30)': table_a2a5
* Column 6: Total income gini coefficient, full controls
ivreg2 gini_inctotw ( ln_life_exp_30 = $mort_heart ) $shcoll $lninctot $mort_other $td i.id [aw=wpop_1960], partial(i.id) cl(id)
	est sto table_a2a6
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2a6
	estadd sca tau10 = `r(c_TSLS_10)': table_a2a6
	estadd sca tau20 = `r(c_TSLS_20)': table_a2a6
	estadd sca tau30 = `r(c_TSLS_30)': table_a2a6
* Display results
esttab table_a2a*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(ln_life_exp_30) scalars(F_eff tau10 tau20 tau30) sfmt(%5.1f) obslast nonotes compress


* Table A2(b): Second stage (LIML)

* Column 1: Wage gini coefficient, no controls
ivreg2 gini_incwagew ( ln_life_exp_30 = $mort_heart ) $td i.id [aw=wpop_1960], partial(i.id) cl(id) liml
	est sto table_a2b1
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2b1
	estadd sca tau10 = `r(c_LIML_10)': table_a2b1
	estadd sca tau20 = `r(c_LIML_20)': table_a2b1
	estadd sca tau30 = `r(c_LIML_30)': table_a2b1
* Column 2: Wage gini coefficient, controls for income and education
ivreg2 gini_incwagew ( ln_life_exp_30 = $mort_heart ) $shcoll $lnincwage $td i.id [aw=wpop_1960], partial(i.id) cl(id) liml
	est sto table_a2b2
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2b2
	estadd sca tau10 = `r(c_LIML_10)': table_a2b2
	estadd sca tau20 = `r(c_LIML_20)': table_a2b2
	estadd sca tau30 = `r(c_LIML_30)': table_a2b2
* Column 3: Wage gini coefficient, full controls
ivreg2 gini_incwagew ( ln_life_exp_30 = $mort_heart ) $shcoll $lnincwage $mort_other $td i.id [aw=wpop_1960], partial(i.id) cl(id) liml
	est sto table_a2b3
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2b3
	estadd sca tau10 = `r(c_LIML_10)': table_a2b3
	estadd sca tau20 = `r(c_LIML_20)': table_a2b3
	estadd sca tau30 = `r(c_LIML_30)': table_a2b3
* Column 4: Total income gini coefficient, no controls
ivreg2 gini_inctotw ( ln_life_exp_30 = $mort_heart ) $td i.id [aw=wpop_1960], partial(i.id) cl(id) liml
	est sto table_a2b4
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2b4
	estadd sca tau10 = `r(c_LIML_10)': table_a2b4
	estadd sca tau20 = `r(c_LIML_20)': table_a2b4
	estadd sca tau30 = `r(c_LIML_30)': table_a2b4
* Column 5: Total income gini coefficient, controls for income and education
ivreg2 gini_inctotw ( ln_life_exp_30 = $mort_heart ) $shcoll $lninctot $td i.id [aw=wpop_1960], partial(i.id) cl(id) liml
	est sto table_a2b5
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2b5
	estadd sca tau10 = `r(c_LIML_10)': table_a2b5
	estadd sca tau20 = `r(c_LIML_20)': table_a2b5
	estadd sca tau30 = `r(c_LIML_30)': table_a2b5
* Column 6: Total income gini coefficient, full controls
ivreg2 gini_inctotw ( ln_life_exp_30 = $mort_heart ) $shcoll $lninctot $mort_other $td i.id [aw=wpop_1960], partial(i.id) cl(id) liml
	est sto table_a2b6
	weakivtest, level(.1)
	estadd sca F_eff = `r(F_eff)': table_a2b6
	estadd sca tau10 = `r(c_LIML_10)': table_a2b6
	estadd sca tau20 = `r(c_LIML_20)': table_a2b6
	estadd sca tau30 = `r(c_LIML_30)': table_a2b6
* Display results
esttab table_a2b*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(ln_life_exp_30) scalars(F_eff tau10 tau20 tau30) sfmt(%5.1f) obslast nonotes compress


* Table A2(c): Reduced form

* Column 1: Wage gini coefficient, no controls
xtreg gini_incwagew $mort_heart $td [aw=wpop_1960], fe cl(id)	
	est sto table_a2c1
* Column 2: Wage gini coefficient, controls for income and education
xtreg gini_incwagew $mort_heart $shcoll $lnincwage $td [aw=wpop_1960], fe cl(id)
	est sto table_a2c2
* Column 3: Wage gini coefficient, full controls
xtreg gini_incwagew $mort_heart $shcoll $lnincwage $mort_other $td [aw=wpop_1960], fe cl(id)
	est sto table_a2c3
* Column 4: Total income gini coefficient, no controls
xtreg gini_inctotw $mort_heart $td [aw=wpop_1960], fe cl(id)
	est sto table_a2c4
* Column 5: Total income gini coefficient, controls for income and education
xtreg gini_inctotw $mort_heart $shcoll $lninctot $td [aw=wpop_1960], fe cl(id)
	est sto table_a2c5
* Column 6: Total income gini coefficient, full controls
xtreg gini_inctotw $mort_heart $shcoll $lninctot $mort_other $td [aw=wpop_1960], fe cl(id)
	est sto table_a2c6
* Display results
esttab table_a2c*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep($mort_heart) obslast nonotes compress


* Table A2(d): First stage

* Column 1: Life expectancy at 30, no controls
xtreg ln_life_exp_30 $mort_heart $td [aw=wpop_1960], fe cl(id)	
	est sto table_a2d1
* Column 2: Life expectancy at 30, controls for income and education
xtreg ln_life_exp_30 $mort_heart $shcoll $lnincwage $td [aw=wpop_1960], fe cl(id)
	est sto table_a2d2
* Column 3: Life expectancy at 30, full controls
xtreg ln_life_exp_30 $mort_heart $shcoll $lnincwage $mort_other $td [aw=wpop_1960], fe cl(id)
	est sto table_a2d3
* Column 4: Life expectancy at 30, no controls
xtreg ln_life_exp_30 $mort_heart $td [aw=wpop_1960], fe cl(id)
	est sto table_a2d4
* Column 5: Life expectancy at 30, controls for income and education
xtreg ln_life_exp_30 $mort_heart $shcoll $lninctot $td [aw=wpop_1960], fe cl(id)
	est sto table_a2d5
* Column 6: Life expectancy at 30, full controls
xtreg ln_life_exp_30 $mort_heart $shcoll $lninctot $mort_other $td [aw=wpop_1960], fe cl(id)
	est sto table_a2d6
* Display results
esttab table_a2d*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep($mort_heart) obslast nonotes compress


********************************************************************************
* Table A3: Ordinary Least Squares: Effect of Health on Income Inequality


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)


* Column 1: Wage gini coefficient, no controls
reg D.gini_incwagew D.ln_life_exp_30 [aw=wpop_1960], cl(id)
	est sto table_a31
* Column 2: Wage gini coefficient, controls for income and education
reg D.gini_incwagew D.ln_life_exp_30 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a32
* Column 3: Wage gini coefficient, full controls
reg D.gini_incwagew D.ln_life_exp_30 D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a33
* Column 4: Total income gini coefficient, no controls
reg D.gini_inctotw D.ln_life_exp_30 [aw=wpop_1960], cl(id)
	est sto table_a34
* Column 5: Total income gini coefficient, controls for income and education
reg D.gini_inctotw D.ln_life_exp_30 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a35
* Column 6: Total income gini coefficient, full controls
reg D.gini_inctotw D.ln_life_exp_30 D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a36
* Display results
esttab table_a3*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.ln_life_exp_30) obslast nonotes compress


********************************************************************************
* Table A4: Measurement: Life Expectancy Measured at Different Ages


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)


* Table A4(a): Wage inequality

* Column 1: Life expectancy measured at birth
ivreg2 D.gini_incwagew ( D.ln_life_exp_birth = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4a1
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4a1
* Column 2: Life expectancy measured at age 20
ivreg2 D.gini_incwagew ( D.ln_life_exp_20 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4a2
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4a2
* Column 3: Life expectancy measured at age 30
ivreg2 D.gini_incwagew ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4a3
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4a3
* Column 4: Life expectancy measured at age 40
ivreg2 D.gini_incwagew ( D.ln_life_exp_40 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4a4
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4a4
* Column 5: Life expectancy measured at age 50
ivreg2 D.gini_incwagew ( D.ln_life_exp_50 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4a5
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4a5
* Column 6: Life expectancy measured at age 60
ivreg2 D.gini_incwagew ( D.ln_life_exp_60 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4a6
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4a6
* Column 7: Life expectancy measured at mean 20-60
ivreg2 D.gini_incwagew ( D.ln_life_exp_mean = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4a7
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4a7
* Display results
esttab table_a4a*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.ln_life_exp_*) scalars(widstat artest) sfmt(%5.1f %5.2f) obslast nonotes compress


* Table A4(a): Total income inequality

* Column 1: Life expectancy measured at birth
ivreg2 D.gini_inctotw ( D.ln_life_exp_birth = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4b1
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4b1
* Column 2: Life expectancy measured at age 20
ivreg2 D.gini_inctotw ( D.ln_life_exp_20 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4b2
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4b2
* Column 3: Life expectancy measured at age 30
ivreg2 D.gini_inctotw ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4b3
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4b3
* Column 4: Life expectancy measured at age 40
ivreg2 D.gini_inctotw ( D.ln_life_exp_40 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4b4
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4b4
* Column 5: Life expectancy measured at age 50
ivreg2 D.gini_inctotw ( D.ln_life_exp_50 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4b5
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4b5
* Column 6: Life expectancy measured at age 60
ivreg2 D.gini_inctotw ( D.ln_life_exp_60 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4b6
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4b6
* Column 7: Life expectancy measured at mean 20-60
ivreg2 D.gini_inctotw ( D.ln_life_exp_mean = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a4b7
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a4b7
* Display results
esttab table_a4b*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.ln_life_exp_*) scalars(widstat artest) sfmt(%5.1f %5.2f) obslast nonotes compress


********************************************************************************
* Table A5: Measurement: Inequality Measured by Theil Index


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)


* Table A5(a): Second stage

* Column 1: Wage Theil index, no controls
ivreg2 D.theil_incwagew ( D.ln_life_exp_30 = D.mort_cvd_2000 ) [aw=wpop_1960], cl(id)
	est sto table_a5a1
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a5a1
* Column 2: Wage Theil index, controls for income and education
ivreg2 D.theil_incwagew ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a5a2
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a5a2
* Column 3: Wage Theil index, full controls
ivreg2 D.theil_incwagew ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a5a3
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a5a3
* Column 4: Total income Theil index, no controls
ivreg2 D.theil_inctotw ( D.ln_life_exp_30 = D.mort_cvd_2000 ) [aw=wpop_1960], cl(id)
	est sto table_a5a4
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a5a4
* Column 5: Total income Theil index, controls for income and education
ivreg2 D.theil_inctotw ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a5a5
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a5a5
* Column 6: Total income Theil index, full controls
ivreg2 D.theil_inctotw ( D.ln_life_exp_30 = D.mort_cvd_2000 ) D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a5a6
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a5a6
* Display results
esttab table_a5a*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.ln_life_exp_30) scalars(widstat artest) sfmt(%5.1f %5.2f) obslast nonotes compress


* Table A5(b): Reduced form

* Column 1: Wage Theil index, no controls
reg D.theil_incwagew D.mort_cvd_2000 [aw=wpop_1960], cl(id)	
	est sto table_a5b1
* Column 2: Wage Theil index, controls for income and education
reg D.theil_incwagew D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a5b2
* Column 3: Wage Theil index, full controls
reg D.theil_incwagew D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a5b3
* Column 4: Total income Theil index, no controls
reg D.theil_inctotw D.mort_cvd_2000 [aw=wpop_1960], cl(id)
	est sto table_a5b4
* Column 5: Total income Theil index, controls for income and education
reg D.theil_inctotw D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a5b5
* Column 6: Total income Theil index, full controls
reg D.theil_inctotw D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a5b6
* Display results
esttab table_a5b*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.mort_cvd_2000) obslast nonotes compress


* Table A5(c): First stage

* Column 1: Life expectancy at 30, no controls
reg D.ln_life_exp_30 D.mort_cvd_2000 [aw=wpop_1960], cl(id)	
	est sto table_a5c1
* Column 2: Life expectancy at 30, controls for income and education
reg D.ln_life_exp_30 D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a5c2
* Column 3: Life expectancy at 30, full controls
reg D.ln_life_exp_30 D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a5c3
* Column 4: Life expectancy at 30, no controls
reg D.ln_life_exp_30 D.mort_cvd_2000 [aw=wpop_1960], cl(id)
	est sto table_a5c4
* Column 5: Life expectancy at 30, controls for income and education
reg D.ln_life_exp_30 D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a5c5
* Column 6: Life expectancy at 30, full controls
reg D.ln_life_exp_30 D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a5c6
* Display results
esttab table_a5c*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.mort_cvd_2000) obslast sfmt(a2) nonotes compress


********************************************************************************
* Table A6: Placebo Test: Infectious Diseases versus Cardiovascular Diseases


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)


* Table A6(a): Reduced form

* Column 1: Wage gini coefficient, only infectious disease mortality
reg D.gini_incwagew D.mort_inf_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a6a1
* Column 2: Wage gini coefficient, infectious and cardiovascular disease mortality
reg D.gini_incwagew D.mort_inf_2000 D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a6a2
* Column 3: Total income gini coefficient, only infectious disease mortality
reg D.gini_inctotw D.mort_inf_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a6a3
* Column 4: Total income gini coefficient, infectious and cardiovascular disease mortality
reg D.gini_inctotw D.mort_inf_2000 D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a6a4
* Display results
esttab table_a6a*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.mort_inf_2000 D.mort_cvd_2000) obslast nonotes compress


* Table A6(b): First stage

* Column 1: Life expectancy at 30, only infectious disease mortality
reg D.ln_life_exp_30 D.mort_inf_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a6b1
* Column 2: Life expectancy at 30, infectious and cardiovascular disease mortality
reg D.ln_life_exp_30 D.mort_inf_2000 D.mort_cvd_2000 D.shcoll_2000 D.lnincwagew1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a6b2
* Column 3: Life expectancy at 30, only infectious disease mortality
reg D.ln_life_exp_30 D.mort_inf_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a6b3
* Column 4: Life expectancy at 30, infectious and cardiovascular disease mortality
reg D.ln_life_exp_30 D.mort_inf_2000 D.mort_cvd_2000 D.shcoll_2000 D.lninctotw1564_2000 [aw=wpop_1960], cl(id)
	est sto table_a6b4
* Display results
esttab table_a6b*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.mort_inf_2000 D.mort_cvd_2000) obslast nonotes compress


********************************************************************************
* Table A7: Set Identification: Relaxing the Exclusion Restriction


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)

g dyw = D.gini_incwagew
g dyi = D.gini_inctotw
g dx = D.ln_life_exp_mean
g dz = D.mort_cvd_2000
g dw1 = D.mort_other_2000
g dw2 = D.shcoll_2000
g dw3 = D.lnincwagew1564_2000
g dy3 = D.lninctotw1564_2000


* Table A7(a): Wage inequality

qui reg D.(gini_incwagew) D.(mort_cvd_2000) D.(shcoll_2000) D.(lnincwagew1564_2000) D.(mort_other_2000) [aw=wpop_1960], cl(id)

mat b = e(b)
mat L = J(1,5,.)

forvalues x = 0.05(0.05)0.25	{
	loc y = `x' * 20
	loc z : di %8.4f b[1,1] * `x'
	di "`x' percent assumed portion of reduced-form effect: " `z'
	mat L[1,`y'] = `z'
}

mat coln L = 5pct 10pct 15pct 20pct 25pct
mat li L

mat table_a7a = J(5,2,.)
mat coln table_a7a = "Lower bound" "Upper bound"
mat rown table_a7a = "Column 1" "Column 2" "Column 3" "Column 4" "Column 5"

* Column 1: 5% of reduced-form effect
plausexog uci dyw dw1 dw2 dw3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0134) gmax(0.0134) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7a[1,1] = `lb'
	mat table_a7a[1,2] = `ub'
* Column 2: 10% of reduced-form effect
plausexog uci dyw dw1 dw2 dw3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0268) gmax(0.0268) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7a[2,1] = `lb'
	mat table_a7a[2,2] = `ub'
* Column 3: 15% of reduced-form effect
plausexog uci dyw dw1 dw2 dw3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0401) gmax(0.0401) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7a[3,1] = `lb'
	mat table_a7a[3,2] = `ub'
* Column 4: 20% of reduced-form effect
plausexog uci dyw dw1 dw2 dw3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0535) gmax(0.0535) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7a[4,1] = `lb'
	mat table_a7a[4,2] = `ub'
* Column 5: 25% of reduced-form effect
plausexog uci dyw dw1 dw2 dw3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0669) gmax(0.0669) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7a[5,1] = `lb'
	mat table_a7a[5,2] = `ub'
* Export results
mat li table_a7a
mat drop b L


* Table A7(b): Total income inequality

qui reg D.(gini_inctotw) D.(mort_cvd_2000) D.(shcoll_2000) D.(lninctotw1564_2000) D.(mort_other_2000) [aw=wpop_1960], cl(id)

mat b = e(b)
mat L = J(1,5,.)

forvalues x = 0.05(0.05)0.25	{
	loc y = `x' * 20
	loc z : di %8.4f b[1,1] * `x'
	di "`x' percent assumed portion of reduced-form effect: " `z'
	mat L[1,`y'] = `z'
}

mat coln L = 5pct 10pct 15pct 20pct 25pct
mat li L

mat table_a7b = J(5,2,.)
mat coln table_a7b = "Lower bound" "Upper bound"
mat rown table_a7b = "Column 1" "Column 2" "Column 3" "Column 4" "Column 5"

* Column 1: 5% of reduced-form effect
plausexog uci dyi dw1 dw2 dy3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0142) gmax(0.0142) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7b[1,1] = `lb'
	mat table_a7b[1,2] = `ub'
* Column 2: 10% of reduced-form effect
plausexog uci dyi dw1 dw2 dy3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0284) gmax(0.0284) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7b[2,1] = `lb'
	mat table_a7b[2,2] = `ub'
* Column 3: 15% of reduced-form effect
plausexog uci dyi dw1 dw2 dy3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0426) gmax(0.0426) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7b[3,1] = `lb'
	mat table_a7b[3,2] = `ub'
* Column 4: 20% of reduced-form effect
plausexog uci dyi dw1 dw2 dy3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0568) gmax(0.0568) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7b[4,1] = `lb'
	mat table_a7b[4,2] = `ub'
* Column 5: 25% of reduced-form effect
plausexog uci dyi dw1 dw2 dy3 ( dx = dz ) [aw=wpop_1960], vce(r) gmin(-0.0711) gmax(0.0711) level(0.95)
	loc lb : di %04.2f e(lb_dx)
	loc ub : di %04.2f e(ub_dx)
	mat table_a7b[5,1] = `lb'
	mat table_a7b[5,2] = `ub'
mat li table_a7b
mat drop b L


********************************************************************************
* Table A8: Mechanisms: Income Growth


use "jeoa100385_data.dta", clear
keep if year == 1960 | year == 2000
xtset id year, delta(40)


* Column 1: Wage gini coefficient, income levels
ivreg2 D.gini_incwagew ( D.ln_incwagew_15_64 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a81
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a81
* Column 2: Total income gini coefficient, income levels
ivreg2 D.gini_inctotw ( D.ln_inctotw_15_64 = D.mort_cvd_2000 ) D.shcoll_2000 D.lnincwagew1564_2000 D.mort_other_2000 [aw=wpop_1960], cl(id)
	est sto table_a82
	rivtest, ci
	estadd sca artest = `r(ar_p)': table_a82
* Display results
esttab table_a8*, b(%3.2f) se(%3.2f) star(* .1 ** .05 *** .01) keep(D.ln_incwagew_15_64 D.ln_inctotw_15_64) scalars(widstat artest) sfmt(%5.1f %5.2f) obslast nonotes compress


clear all
exit


********************************************************************************
********************************************************************************
